-- gift
-- created by panyl
-- 进入下一层时，获得xx系魔法卷轴

return {
    apply = function(prop, baseValue)
        return baseValue + prop[3];
    end,

    -- 进入下一层触发
    trigger = function(who, prop, arg)
        local count = prop[3];

        for i = 1, count do
            local spell = SpellM.fetchSpell(tonumber(prop[2]), DungeonM.getRandSeed("gift"));

            BonusM.doBonus({ 1, spell, 1, }, "prop gift");
        end

        return true;
    end,

    record = function(target, prop, path)
        return false;
    end
};
